@extends('layouts.ajax_master')
@section('app_js')
    <script src="/resource/js/gl_index_.js"></script>
@stop
@section('content')
    <div class="shop-in">
        <div class="in-head">
            <input type="checkbox" id="check-all" checked> 全选
            <a href="/shop_cart_list">去购物车</a>
            <i></i>
        </div>
        <div class="in-ul">
            @foreach($data->cart_info as $v)
                <div class="in-li">
                    <div class="bus-name">
                        <input type="checkbox" class="check-bus" checked>
                        <div class="name">{{$v->storage_name}}</div>
                    </div>
                    @foreach($v->cart_info as $vv)
                        <div class="info" stock="{{$vv->useable_stock}}">
                            <input type="checkbox" cart-id="{{$vv->cart_id}}" checked>
                            <div class="in">
                                <div class="til"><a href="javascript:;">
                                        {{$vv->brand_name}}&#160; {{$vv->product_spec}}&#160; {{$vv->m_name}}&#160; {{$vv->storage_name}}
                                    </a></div>
                                <div class="p">
                                    件重/吨：<i class="w_per_piece">{{$vv->piece_weight}} </i><span class="price">￥{{$vv->product_price}}/吨</span>
                                </div>
                                <div class="bot">
                                    <div class="info-num left">
                                        <a href="javascript:;" class="pre"></a>
                                        <input type="text" id="info-num" value="{{$vv->number}}" class="number" product_id="{{$vv->product_id}}">
                                        <a href="javascript:;" class="next"></a>
                                    </div>
                                    <a href="/head_cart_delete?cart_id={{$vv->cart_id}}" class="del">删除</a>
                                </div>
                            </div>
                        </div>
                    @endforeach

                </div>
            @endforeach
        </div>
        <div class="in-bot">
            <div class="bot-info">
                <div class="left sta-num">共 <span>{{$data->cart_count->num}}</span> 件</div>
                <div class="right sta-mon">商品总计：<span>￥{{round($data->price->price,2)}}</span></div>
            </div>
            <a href="javascript:;" id="cart-submit" class="go">去下单</a>
        </div>
    </div>